# This project name is oop.
PROJECT( OOP )
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

# Direct any out-of-source builds to this directory
SET( OOP_SRC_DIR ${CMAKE_SOURCE_DIR} )
INCLUDE_DIRECTORIES("${OOP_SRC_DIR}")

# Add any new source files to this list.
SET( OOP_SRC
  Animal.cpp
  Forest.cpp
  main.cpp
  Organism.cpp
  Plant.cpp
  Time.cpp
  )

# Add subdirs and build for the models
#ADD_SUBDIRECTORY()

# This is the directory that holds the doxygen doxyfile template (doxy.conf.in)
SET( DOC_INPUT_DIR ${OOP_SRC_DIR}/doc)

# If doxygen exists, use the doc/CMakeLists.txt file for further instructions. 
FIND_PACKAGE(Doxygen)
IF (DOXYGEN_FOUND)
	ADD_SUBDIRECTORY(doc)
	SET( DOC_OUTPUT_DIR ${CMAKE_BINARY_DIR}/doc )
ELSE (DOXYGEN_FOUND)
	MESSAGE(STATUS "WARNING: Doxygen not found - doc won't be created")
ENDIF (DOXYGEN_FOUND)

# Build the oop executable from the OOP_SRC source files
ADD_EXECUTABLE( oop ${OOP_SRC} )
